projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8197cf
)
(regexp-opt-group): Avoid infinite
author
Karl Heuer
<kwzh@gnu.org>
Fri, 4 Jun 1999 18:36:35 +0000
(18:36 +0000)
committer
Karl Heuer
<kwzh@gnu.org>
Fri, 4 Jun 1999 18:36:35 +0000
(18:36 +0000)
recursion on bogus input.
lisp/emacs-lisp/regexp-opt.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/regexp-opt.el
b/lisp/emacs-lisp/regexp-opt.el
index 589f1b70ac4508cf78209125e81a9abae43afd4c..6627c20a7bf165a7b64535882084157febd38131 100644
(file)
--- a/
lisp/emacs-lisp/regexp-opt.el
+++ b/
lisp/emacs-lisp/regexp-opt.el
@@
-141,7
+141,9
@@
in REGEXP."
(open-charset (if lax "" open-group))
(close-charset (if lax "" close-group)))
(cond
- ;;
+ ;; Protect against user-stupidity... could call error here
+ ((null strings)
+ nil)
;; If there is only one string, just return it.
((= (length strings) 1)
(if (= (length (car strings)) 1)